Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
commit0d1f44b13926ec3ea04da05b19ec7ff05edb0145
tree3671a7cbaa8b4760ddfef27fd247eab4ceebe5b2
parent13189c620b2e9ca885b21b2a3b70dc4531a967b2
Hurd: fix port leak in TLS

Depending on whether the thread is the main thread or not, the threading
library can have trouble determining whether the thread reference in the
TCB is valid. The simple solution is to let the threading library
initialize the TCB, and use a temporary reference when initializing TLS.

* sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Use a temporary thread
reference.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-tls_thread_leak.diff
sysdeps/mach/hurd/i386/tls.h